﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ForeProgram/Shared/UserInfo.master"
    AutoEventWireup="true" CodeFile="ModifyPassword.aspx.cs" Inherits="ForeProgram_ModifyPassword" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript">
        function checkPassword() {
            var objOldPassword = document.getElementById('<%=txtoldPassword.ClientID %>');
            var objNewPassword = document.getElementById('<%=txtnewPassword.ClientID %>');
            var objRepertPassword = document.getElementById('<%=txtnewPassword.ClientID %>');

            if (objOldPassword.value.trim()=="") {
                alert("请填写旧密码");
                objOldPassword.focus();
                return false;
            }

            if (objNewPassword.value.trim() == "") {
                alert("请填写新密码");
                objNewPassword.focus();
                return false;
            }


            if (objNewPassword.value.length < 4 || objNewPassword.value.length > 14) {
                alert("密码最少4个字，不得超过14个字");
                objNewPassword.focus();
                return false;
            }
            if (objRepertPassword.value.trim() == "") {
                alert("请填写确认密码");
                objRepertPassword.focus();
                return false;
            }

            if (objRepertPassword.value != objNewPassword.value) {
                alert("两次填写的密码不一样");
                objRepertPassword.focus();
                return false;
            }

            return true;
        } 
        String.prototype.trim = function () {
            return this.replace(/(^\s*)|(\s*$)/g, "");
        }
    </script>
    <div class="shop_main_r">
        <div class="index_content_top">
            <!--修改密码 -->
            <div class="record">
                <table class="Table" bordercolor="#E0E0E0" width="100%" border="1">
                    <tbody>
                        <tr>
                            <th>
                                修改密码
                            </th>
                        </tr>
                        <tr>
                            <td>
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="16%" class="cntright">
                                                        旧密码：
                                                    </td>
                                                    <td class="cntleft">
                                                    <asp:TextBox ID="txtoldPassword" TextMode="Password" onblur="this.style.borderColor='#dcdcdc'" Columns="20"
                                                                   class="inp1" onfocus="this.style.borderColor='#fc9938'" runat="server"></asp:TextBox>
                                                      
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="cntright">
                                                        新密码：
                                                    </td>
                                                    <td class="cntleft">
                                                    <asp:TextBox ID="txtnewPassword" TextMode="Password" onblur="this.style.borderColor='#dcdcdc'" Columns="20"
                                                                   class="inp1" onfocus="this.style.borderColor='#fc9938'" runat="server"></asp:TextBox>
                                                        密码要求由长度为4-14位字符组成
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="cntright">
                                                        确认密码：
                                                    </td>
                                                    <td class="cntleft">
                                                    <asp:TextBox ID="txtrepertPassword" TextMode="Password" onblur="this.style.borderColor='#dcdcdc'" Columns="20"
                                                                   class="inp1" onfocus="this.style.borderColor='#fc9938'" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" class="cntright">
                                                    </td>
                                                    <td class="cntleft">
                                                    <asp:ImageButton ID="imgSubit"  src="images/botton_submit_1.jpg" runat="server" 
                                                            onclick="imgSubit_Click" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <!--修改密码 结束-->
        </div>
    </div>
</asp:Content>
